<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vm实例和生命周期</title>
    <script src="../vue.global.js"></script>
    <style>
        .red{
            color:red;
        }
        .font-big{
            font-size: 50px;
        }
    </style>
</head>
<body>

<div id="App">


    <div >{{count}}</div>
    <div id="txt">mm</div>
</div>


<script>


    const x = {
        data(){
            alert("xxx");
        }
    };
    const app = Vue.createApp({

        data(){
            return {
                count:100
            }
        },
        created(){
            this.count=999;

        },
        mounted(){
            console.log(document.getElementById("txt").innerText)
        },
        updated(){
            console.log("有东西被改了");
        }
    });

    console.log(app)

    const vm = app.mount("#App");
    console.log(vm.count)

    //x.data();

</script>
</body>
</html>